package com.saint.order.controller;

import com.saint.order.service.OrderService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
//@RequiredArgsConstructor(onConstructor = @_(@Autowired))
@RequiredArgsConstructor
public class OrderController {

    private final OrderService orderService;

//    @SentinelResource("create")
    @GetMapping("/create")
    public Boolean create(String userId, String commodityCode, Integer count) {
        orderService.create(userId, commodityCode, count);
        return true;
    }

}